|
RAIS
3.2
|
00001 00028 using System; 00029 using System.Data; 00030 using System.Configuration; 00031 using System.Collections; 00032 using System.Web; 00033 using System.Web.Security; 00034 using System.Web.UI; 00035 using System.Web.UI.WebControls; 00036 using System.Web.UI.WebControls.WebParts; 00037 using System.Web.UI.HtmlControls; 00038 00039 using RAIS.Common.UserManagement; 00040 //using RAIS.ApplicationLogicLayer; 00041 00042 namespace RAIS.UI.SpecificMasks 00043 { 00047 public partial class Default : System.Web.UI.Page 00048 { 00049 //********************************************************************* 00050 #region Properties 00051 00054 protected UserData CurrentUser 00055 { 00056 get { return (UserData)this.Session[UI.Common.Constants.CURRENT_USER_TAG]; } 00057 } 00058 #endregion 00059 #region Event handlers 00060 protected void Page_PreLoad(object sender, EventArgs e) 00061 { 00062 RAIS.UI.Common.PageManagement.TrimTextBoxValues(this); 00063 } 00070 protected void Page_Load(object sender, EventArgs e) 00071 { 00072 this.Response.Cache.SetNoStore(); 00073 if (this.CurrentUser == null) 00074 UI.Common.AccessManagement.SignOut(this); 00075 00076 if (!this.IsPostBack) 00077 { 00078 UserData currentUser = (UserData)this.Session[UI.Common.Constants.CURRENT_USER_TAG]; 00079 //string selectedContext = (string)this.Session[UI.Common.Constants.SELECTED_CATEGORY_TAG]; 00080 //if (selectedContext == null) 00081 //{ 00082 // if (currentUser.Type.Type == UserData.UserType.Admin) 00083 // selectedContext = RAIS.Common.Constants.CATEGORY_NAME_ADMINISTRATION; 00084 // else 00085 // if (currentUser.Type.Type == UserData.UserType.Regulator) 00086 // selectedContext = RAIS.Common.Constants.CATEGORY_NAME_REGULATORY_SYSTEM; 00087 // else 00088 // selectedContext = RAIS.Common.Constants.CATEGORY_NAME_INPUT; 00089 //} 00090 00091 //UI.Common.PageManagement.InitializePageTreeForCategory(this, this.TreeView1, selectedContext); 00092 this.LBLusernameNoTranslation.Text = this.CurrentUser.Name; 00093 00094 UI.Common.PageManagement.InitializePageTreeForCategory(this, this.TreeView1, null); 00095 this.LBLhelp.ForeColor = RAIS.UI.Common.Constants.COLOR_OF_MENU_BAR_TEXT_HIGHLIGHT; 00096 // this.LBTNmessagebox.Visible = !(this.CurrentUser.FunctionalRole.Type == FunctionRole.FunctionRoleType.Guest); 00097 } 00098 } 00105 protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e) 00106 { 00107 // UI.Common.UserManagement.ProcessTreeViewOnRedirect(this.TreeView1); 00108 } 00115 protected void LBTNlogout_Click(object sender, EventArgs e) 00116 { 00117 UI.Common.AccessManagement.SignOut(this); 00118 } 00119 #endregion 00120 #region Private helper methods 00121 #endregion 00122 } 00123 }